<!DOCTYPE html>
	<html lang="en">
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1.0">
		<title>我的动态</title>
		<link rel="stylesheet" type="text/css" href="../css/footer.css">
		<link rel="stylesheet" type="text/css" href="../css/dynamic.css">
		<link rel="stylesheet" href="../css/CSS.css">
	</head>
	<body>
	<header>
		<a href="javascript:history.back(-1)" class="back"><img src="../img/back.png" height="18px"></a>
		<div class="center title">我的动态</div>
	</header>
		<div class="content-wrap">
			<!-- <div class="content">
				<a href="#" class="underlining">
					<div class="flex">
						<div><img src="../img/logo.png" width="50px"></div>
						<div>
							<p class="username">小静静</p>
							<p class="girl flex">
								<img src="../img/female-s.png" height="7px"> 23
							</p>
						</div>
					</div>
					<p class="wz">有在南山的朋友吗？</p>
					<div class="flex pic">
						<img src="../img/logo.png">
					</div>
					<div class="flex xs-r">
						<p>0.1km</p>
						<img src="../img/break.png" height="5px" class="break">
						<p>5分钟前</p>
						<img src="../img/break.png" height="5px" class="break">
						<p>1080阅读</p>
					</div>
				</a>
				<div class="flex xs-r">
					<div class="addlike">
						<img src="../img/like-n.png" height="15px">
						<span>15</span>
					</div>
					<div>
						<img src="../img/comment.png" height="15px">
						<span>6</span>
					</div>
					<div class="chat">
						<img src="../img/chat.png" height="15px">
					</div>
				</div>
			</div>
			<div class="content">
				<a href="#" class="underlining">
					<div class="flex">
						<div><img src="../img/logo.png" width="50px"></div>
						<div>
							<p class="username">小静静</p>
							<p class="girl flex">
								<img src="../img/female-s.png" height="7px"> 23
							</p>
						</div>
					</div>
					<p class="wz">有在南山的朋友吗？</p>
					<div class="flex pic">
						<img src="../img/logo.png">
						<img src="../img/logo.png">
						<img src="../img/logo.png">
						<img src="../img/logo.png">
					</div>
					<div class="flex xs-r">
						<p>0.1km</p>
						<img src="../img/break.png" height="5px" class="break">
						<p>5分钟前</p>
						<img src="../img/break.png" height="5px" class="break">
						<p>1080阅读</p>
					</div>
				</a>
				<div class="flex xs-r">
					<div class="addlike">
						<img src="../img/like-n.png" height="15px">
						<span>15</span>
					</div>
					<div>
						<img src="../img/comment.png" height="15px">
						<span>6</span>
					</div>
					<div class="chat">
						<img src="../img/chat.png" height="15px">
					</div>
				</div>
			</div> -->
		</div>
	</body>
</html>
<script src="../js/jquery-3.3.1.js"></script>
<script type="text/javascript">
	var uCount=localStorage.getItem("uCount");
	var phone=localStorage.getItem("uPhone"); 


	$.post('/meiyou/dongtai/selectAllDongtaiByAccount',{account:uCount},function(data){
		var datas=data.extend.list;
		$.each(datas,function(i,value){
			showuser(value);
		});	
	});


	function showuser(data){
		$.post('/meiyou/dongtai/selectUserById',{uccount:uCount},function(res) {
			var user=res.extend.user;
			sekdynamic(data,user);

		})
	}

	//查询动态
		function sekdynamic(dynamic,user){
		if(user.uSex=="男"){
			$('.content-wrap').append("<div class=\"content\">" +
				"<a href='details-infor.html?id="+dynamic.tId+"' class=\"underlining\">" +
				"<div class=\"flex\">" +
				"<div><img src='"+user.uImg+"' width=\"50px\" style='border-radius: 100%'></div>" +
				"<div>" +
				"<p class=\"username\">"+user.uName+"</p>" +
				"<p class=\"boy flex\">" +
				"<img src=\"../img/male-s.png\" height=\"7px\">"+user.uOld +
				"</p>" +
				"</div>" +
				"</div>" +
				"<p class=\"wz\">"+dynamic.tContext+"</p>" +
				"<div class=\"flex pic\" id='"+dynamic.tId+"'>" +
				
				"</div>" +
				"<div class=\"flex xs-r\">" +
				
				"<img src=\"../img/break.png\" height=\"5px\" class=\"break\">" +
				"<p>"+dynamic.tTime+"</p>" +
				"<img src=\"../img/break.png\" height=\"5px\" class=\"break\">" +
				"</div>" +
				"</a>" +
				"<div class=\"flex xs-r\">" +
				"</div>" +
				"</div>");
		}else{
			$('.content-wrap').append("<div class=\"content\">" +
				"<a href='details-infor.html?id="+dynamic.tId+"' class=\"underlining\">" +
				"<div class=\"flex\">" +
				"<div><img src='"+user.uImg+"' width=\"50px\" style='border-radius: 100%'></div>" +
				"<div>" +
				"<p class=\"username\">"+user.uName+"</p>" +
				"<p class=\"girl flex\">" +
				"<img src=\"../img/female-s.png\" height=\"7px\">"+user.uOld +
				"</p>" +
				"</div>" +
				"</div>" +
				"<p class=\"wz\">"+dynamic.tContext+"</p>" +
				"<div class=\"flex pic\" id='"+dynamic.tId+"'>" +
				
				"</div>" +
				"<div class=\"flex xs-r\">" +
				
				"<img src=\"../img/break.png\" height=\"5px\" class=\"break\">" +
				"<p>"+dynamic.tTime+"</p>" +
				"<img src=\"../img/break.png\" height=\"5px\" class=\"break\">" +
				"</div>" +
				"</a>" +
				"<div class=\"flex xs-r\">" +
				
				"</div>" +
				"</div>");
			
		}
		var id=dynamic.tId;
		var img=dynamic.tImg;
		var imgs=JSON.parse(img);
		console.log(imgs);
		$.each(imgs,function(i,val){
			$('#'+id).append("<img src='"+val+"' height='100px' width='100px'>")
		});	









		}
/*$.post('/meiyou/dongtai/selectDongtaiByuccount',{uccount:phone},function(data){
		var datas=data.extend.list.tImgorVideo;
		console.log(datas);
		$.each(datas,function(i,val){
			$('.pic').append("<img src='"+val+"'>")
		});
		
});*/

</script>